/// <reference path="../lib/ts/box2d.d.ts" />
/// <reference path="../lib/ts/easeljs.d.ts" />
/// <reference path="../lib/ts/keymaster.d.ts" />
/// <reference path="../lib/ts/jquery.d.ts" />
/// <reference path="../classes/World.ts" />
/// <reference path="../classes/Unit.ts" />
/// <reference path="../classes/Category.ts" />
/// <reference path="../classes/Controller.ts" />
/// <reference path="../classes/PlateBlock.ts" />
/// <reference path="../classes/BrickBlock.ts" />
/// <reference path="../maps/Stage_1.ts" />

import b2FixtureDef = Box2D.Dynamics.b2FixtureDef;
import b2PolygonShape = Box2D.Collision.Shapes.b2PolygonShape;
import b2World = Box2D.Dynamics.b2World;
import b2Body = Box2D.Dynamics.b2Body;
import b2BodyDef = Box2D.Dynamics.b2BodyDef;
import b2Vec2 = Box2D.Common.Math.b2Vec2;
import b2Fixture = Box2D.Dynamics.b2Fixture;
import b2MassData = Box2D.Collision.Shapes.b2MassData;
import b2DebugDraw = Box2D.Dynamics.b2DebugDraw;
import b2ContactListener = Box2D.Dynamics.b2ContactListener;

import Stage = createjs.Stage;
import Sprite = createjs.Sprite;
import SpriteSheet = createjs.SpriteSheet;
import DisplayObject = createjs.DisplayObject;

var requestAnimFrame: (callback: () => void) => void = (function(){ 
  return window.requestAnimationFrame || 
  (<any>window).webkitRequestAnimationFrame || 
  (<any>window).mozRequestAnimationFrame || 
  (<any>window).oRequestAnimationFrame || 
  window.msRequestAnimationFrame || 
  function(callback){ 
      window.setTimeout(callback, 1000 / 60, new Date().getTime()); 
  }; 
})(); 

function toRad(deg) {
	return  deg * Math.PI / 180;
}